TimelineEventHandler Class Reference

#include <TimelineEventHandler.h>

List of all members.

Public Member Functions

 TimelineEventHandler (osg::ref_ptr< osgProducer::Viewer > viewer, osg::ref_ptr< osg::Group > quadGroup)
 ~TimelineEventHandler ()
bool handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
void select (const osgGA::GUIEventAdapter &ea)
void changeStateRed ()
void changeStateWhite ()
void changeStateGrey ()
void paintWhiteAll ()
void paintGrey ()

Private Attributes

osg::ref_ptr< osgProducer::Viewer > _viewer
osg::ref_ptr< osg::Group > _quadGroup
osg::StateSet * stateset
osg::StateSet * statesetG
osg::StateSet * statesetOld
int isBeforeHit


Detailed Description

TimelineEventHandler class inhereted from osgGA::GUIEventHandler. defines the interfaces to handle inputs to the timeline window.

Definition at line 7 of file TimelineEventHandler.h.


Constructor & Destructor Documentation

TimelineEventHandler::TimelineEventHandler (  osg::ref_ptr< osgProducer::Viewer >  viewer,
osg::ref_ptr< osg::Group >  quadGroup
)  [inline]
 

A constructor. initializes private members

Definition at line 23 of file TimelineEventHandler.h.

References isBeforeHit.

TimelineEventHandler::~TimelineEventHandler (   )  [inline]
 

A destructor.

Definition at line 28 of file TimelineEventHandler.h.


Member Function Documentation

void TimelineEventHandler::changeStateGrey (   ) 
 

a normal member. this function identifies the non-selected frames, change color states of the frames as grey

Definition at line 116 of file TimelineEventHandler.cpp.

References statesetG.

Referenced by paintGrey().

void TimelineEventHandler::changeStateRed (   ) 
 

a normal member. this function identifies the selected frame, change color state of the frame that is clicked as red

Definition at line 96 of file TimelineEventHandler.cpp.

References stateset.

Referenced by select().

void TimelineEventHandler::changeStateWhite (   ) 
 

a normal member. this function identifies the non-selected frames, change color states of the frames as white

Definition at line 134 of file TimelineEventHandler.cpp.

References statesetOld.

Referenced by select().

bool TimelineEventHandler::handle (  const osgGA::GUIEventAdapter &  ea,
osgGA::GUIActionAdapter &  us
) 
 

a normal member taking two arguments and returning bool.

Parameters:
ea is a constant osgGA::GUIEventAdapter& argument.
us is a constant osgGA::GUIActionAdapter&.
Returns:
true if the event is move, drag or push
See also:
select(const osgGA::GUIEventAdapter& ea) this function handles the mouse events of timeline window calls select if the event is push.

Definition at line 1 of file TimelineEventHandler.cpp.

References select().

void TimelineEventHandler::paintGrey (   ) 
 

a normal member. this function set material properties of osg::Groups

Definition at line 75 of file TimelineEventHandler.cpp.

References _quadGroup, changeStateGrey(), OSGWindows::getFrames(), osgwind, and statesetG.

Referenced by select().

void TimelineEventHandler::paintWhiteAll (   ) 
 

a normal member. this function set material properties of osg::Groups

Definition at line 152 of file TimelineEventHandler.cpp.

References _quadGroup, OSGWindows::getFrames(), and osgwind.

void TimelineEventHandler::select (  const osgGA::GUIEventAdapter &  ea  ) 
 

a normal member taking one argument and returning none.

Parameters:
ea is a constant osgGA::GUIEventAdapter& argument. this function identifies the selected frame, change color states of the frames accordingly calls osgWindows clickedOnAFrame function.

Definition at line 27 of file TimelineEventHandler.cpp.

References _viewer, changeStateRed(), changeStateWhite(), OSGWindows::clickedOnAFrame(), isBeforeHit, osgwind, paintGrey(), stateset, and statesetOld.

Referenced by handle().


Member Data Documentation

osg::ref_ptr<osg::Group> TimelineEventHandler::_quadGroup [private]
 

Definition at line 10 of file TimelineEventHandler.h.

Referenced by paintGrey(), and paintWhiteAll().

osg::ref_ptr<osgProducer::Viewer> TimelineEventHandler::_viewer [private]
 

Definition at line 9 of file TimelineEventHandler.h.

Referenced by select().

int TimelineEventHandler::isBeforeHit [private]
 

Definition at line 15 of file TimelineEventHandler.h.

Referenced by select(), and TimelineEventHandler().

osg::StateSet* TimelineEventHandler::stateset [private]
 

Definition at line 11 of file TimelineEventHandler.h.

Referenced by changeStateRed(), and select().

osg::StateSet* TimelineEventHandler::statesetG [private]
 

Definition at line 12 of file TimelineEventHandler.h.

Referenced by changeStateGrey(), and paintGrey().

osg::StateSet* TimelineEventHandler::statesetOld [private]
 

Definition at line 13 of file TimelineEventHandler.h.

Referenced by changeStateWhite(), and select().


The documentation for this class was generated from the following files:
Generated on Sun May 28 18:54:14 2006 for TraffEdu by  doxygen 1.4.6-NO